package view.Bullet
{
	import starling.display.Image;
	import starling.display.Stage;
	import starling.events.EventDispatcher;
	
	import utils.LayerUtils;
	import utils.LevelConfigXmlUtils;
	
	import view.FireBulletVO;
	
	public class BulletForTipManager extends EventDispatcher
	{
		private static var _instance:BulletForTipManager;
		private var _bulletForTipView:BulletForTipView;
        /**提示子弹的ID*/
		private var _tipId:uint;
		public function BulletForTipManager()
		{
			super();
		}
		
		public static function getInstance():BulletForTipManager{
			return _instance||=new BulletForTipManager();
		}
		
		public function start(stage:Stage):void{
			_tipId = FireBulletVO.randomId();
			_bulletForTipView = new BulletForTipView(_tipId);
			_bulletForTipView.x = stage.stageWidth - _bulletForTipView.width;
			_bulletForTipView.y = 2;
			LayerUtils.getInstance().frameLayer.addChild(_bulletForTipView);
		}
		
		public function showNextBulletTip(bulletId:uint):void{
			_bulletForTipView.showNextBulletTip(bulletId);
		}

		public function get tipId():uint
		{
			return _tipId;
		}

		public function set tipId(value:uint):void
		{
			_tipId = value;
		}

	}
}
